//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IVertexLayout.h>
///	@path	~/src/graphics/
///	@date	2007/10/25
///	@desc	.

#pragma once

#include "xeres.h"

#include "object/IObject.h"

#include "graphics/ISlotLayout.h"
#include "graphics/RenderContext.h"

namespace xeres {

	// forward declaration
	class IShaderAdapter;

	/*!
		\class	IVertexLayout
		\brief	Vertex layout abstraction.
	*/
	class IVertexLayout : public IObject
	{
	public:

		/// \ctor
		IVertexLayout( void );

		/// \dtor
		virtual ~IVertexLayout( void );

		DECL_IOBJECT_INTERFACE( IVertexLayout , IObject );

	public:

		//@ interface

		/*! 
			\brief		Apply vertex layout.
		*/
		virtual void ApplyLayout( RenderContext& rc ) = 0;

		/*!
			\brief		Get used slot count.
		*/
		virtual size_t GetSlotCount( void ) = 0;

		/*! 
			\brief		Get slot layout.
		*/
		virtual RefWeak<ISlotLayout> GetSlot( size_t slot ) = 0;

		/*! 
			\brief		Get default shader adapter.
		*/
		virtual RefWeak<IShaderAdapter> GetDefaultAdapter( void ) = 0;
	};

} // namespace xeres
